package com.shenda.device.handler.handlers;

import org.springframework.stereotype.Component;

import com.shenda.device.message.RespMsg;
import com.shenda.device.message.RespMsg_UploadData;

/**
 * 处理上传的数据
 * 
 * @author lifeng
 */
@Component
public class UploadDataHandler extends AbstractHandler {

	@Override
	protected boolean supportCmds(RespMsg resp) {
		return resp instanceof RespMsg_UploadData;
	}

	@Override
	protected void doInnerHandle(RespMsg resp) {
		RespMsg_UploadData respMsg = (RespMsg_UploadData) resp;
		resp.getDevice().uploadData(respMsg.getData());
	}
}